# -*- coding:utf-8 -*-
# @FileName  :per_reqresult.py
# @Time      :2020/12/16 9:51
# @Author    :Zhoujirong
# @Desc      :
from common.http_request import Request
from biz.support.urls import ServerUrl

class PerReqResultRequest:
    @classmethod
    def get_page(cls,curPage,
                    maxSize,
                    search_EQ_clientName,
                    search_EQ_certType,
                    search_EQ_certNo,
                    search_EQ_qryReason,
                    search_EQ_queryFormat,
                    search_EQ_queryType,
                    search_EQ_status,
                    search_EQ_resultStatus,
                    search_GTE_LTE_operTime_DATE_RANGE,cookie):
        params = {
            'curPage':curPage,
            'maxSize':maxSize,
            'search_EQ_clientName':search_EQ_clientName,
            'search_EQ_certType':search_EQ_certType,
            'search_EQ_certNo':search_EQ_certNo,
            'search_EQ_qryReason':search_EQ_qryReason,
            'search_EQ_queryFormat':search_EQ_queryFormat,
            'search_EQ_queryType':search_EQ_queryType,
            'search_EQ_status':search_EQ_status,
            'search_EQ_resultStatus':search_EQ_resultStatus,
            'search_GTE_LTE_operTime_DATE_RANGE':search_GTE_LTE_operTime_DATE_RANGE
        }
        req = Request(ServerUrl.per_reqresult_getpage_url,params=params,headers=cookie)
        return req.get()

    @classmethod
    def resubmit_task(cls,ids,cookie):
        params = {
            'ids':ids
        }
        req = Request(ServerUrl.per_resubmit_getpage_url,params=params,headers=cookie)
        return req.post()

    @classmethod
    def detail(cls,id,cookie):
        '''详情框架'''
        data = {
            'id':id
        }
        req = Request(ServerUrl.per_reqresult_detail_url,params=data,headers=cookie)
        return req.get()

    @classmethod
    def reqresult_findbyid(cls,id,cookie):
        '''查看详情-基本信息'''
        data = {
            'id':id
        }
        req = Request(ServerUrl.per_reqresult_findbyid_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def archive_findbyid(cls,id,cookie):
        '''查看详情-授权信息'''
        data = {
            'id': id
        }
        req = Request(ServerUrl.per_archive_findbyid_url, data=data, headers=cookie)
        return req.post()

    @classmethod
    def findbyarchiveid(cls,archiveId,cookie):
        '''查看详情-授权档案信息'''
        data = {
            'archiveId':archiveId
        }
        req = Request(ServerUrl.per_findbyarchiveid_url,params=data,headers=cookie)
        return req.get_list()

    @classmethod
    def applyreport(cls,archiveId,
                        archiveViewStatus,
                        assocbsnssData,
                        certNo,
                        certType,
                        checkinfoId,
                        clientIp,
                        clientName,
                        creditUser,
                        ext1,
                        ext2,
                        ext3,
                        ext4,
                        ext5,
                        ext6,
                        id,
                        note,
                        operOrg,
                        operTime,
                        operator,
                        president,
                        qryReason,
                        queryFormat,
                        queryTime,
                        queryType,
                        reason,
                        refuseReasons,
                        rekOrg,
                        rekTime,
                        rekType,
                        rekUser,
                        remarks,
                        reqId,
                        resCode,
                        resMsg,
                        resultStatus,
                        resultType,
                        serialNumber,
                        source,
                        status,cookie):
        '''异步查询检查本地报告'''
        data = {
            'archiveId':archiveId,
            'archiveViewStatus':archiveViewStatus,
            'assocbsnssData':assocbsnssData,
            'certNo':certNo,
            'certType':certType,
            'checkinfoId':checkinfoId,
            'clientIp':clientIp,
            'clientName':clientName,
            'creditUser':creditUser,
            'ext1':ext1,
            'ext2':ext2,
            'ext3':ext3,
            'ext4':ext4,
            'ext5':ext5,
            'ext6':ext6,
            'id':id,
            'note':note,
            'operOrg':operOrg,
            'operTime':operTime,
            'operator':operator,
            'president':president,
            'qryReason':qryReason,
            'queryFormat':queryFormat,
            'queryTime':queryTime,
            'queryType':queryType,
            'reason':reason,
            'refuseReasons':refuseReasons,
            'rekOrg':rekOrg,
            'rekTime':rekTime,
            'rekType':rekType,
            'rekUser':rekUser,
            'remarks':remarks,
            'reqId':reqId,
            'resCode':resCode,
            'resMsg':resMsg,
            'resultStatus':resultStatus,
            'resultType':resultType,
            'serialNumber':serialNumber,
            'source':source,
            'status':status
        }
        req = Request(ServerUrl.per_reqresult_applyreport_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def showcreditreport(cls,archiveId,
                        archiveViewStatus,
                        assocbsnssData,
                        certNo,
                        certType,
                        checkinfoId,
                        clientIp,
                        clientName,
                        creditUser,
                        ext1,
                        ext2,
                        ext3,
                        ext4,
                        ext5,
                        ext6,
                        id,
                        note,
                        operOrg,
                        operTime,
                        operator,
                        president,
                        qryReason,
                        queryFormat,
                        queryTime,
                        queryType,
                        reason,
                        refuseReasons,
                        rekOrg,
                        rekTime,
                        rekType,
                        rekUser,
                        remarks,
                        reqId,
                        resCode,
                        resMsg,
                        resultStatus,
                        resultType,
                        serialNumber,
                        source,
                        status,cookie):
        '''异步查询信用报告'''
        data = {
            'archiveId':archiveId,
            'archiveViewStatus':archiveViewStatus,
            'assocbsnssData':assocbsnssData,
            'certNo':certNo,
            'certType':certType,
            'checkinfoId':checkinfoId,
            'clientIp':clientIp,
            'clientName':clientName,
            'creditUser':creditUser,
            'ext1':ext1,
            'ext2':ext2,
            'ext3':ext3,
            'ext4':ext4,
            'ext5':ext5,
            'ext6':ext6,
            'id':id,
            'note':note,
            'operOrg':operOrg,
            'operTime':operTime,
            'operator':operator,
            'president':president,
            'qryReason':qryReason,
            'queryFormat':queryFormat,
            'queryTime':queryTime,
            'queryType':queryType,
            'reason':reason,
            'refuseReasons':refuseReasons,
            'rekOrg':rekOrg,
            'rekTime':rekTime,
            'rekType':rekType,
            'rekUser':rekUser,
            'remarks':remarks,
            'reqId':reqId,
            'resCode':resCode,
            'resMsg':resMsg,
            'resultStatus':resultStatus,
            'resultType':resultType,
            'serialNumber':serialNumber,
            'source':source,
            'status':status
        }
        req = Request(ServerUrl.per_reqresult_showcreditreport_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def revealreport(cls,recordId,cookie):
        '''展示报告框架'''
        params={
            'recordId':recordId
        }
        req = Request(ServerUrl.per_revealreport_url,params=params,headers=cookie)
        return req.get()

    @classmethod
    def localcreditreport(cls, archiveId,
                    archiveViewStatus,
                    assocbsnssData,
                    certNo,
                    certType,
                    checkinfoId,
                    clientIp,
                    clientName,
                    creditUser,
                    ext1,
                    ext2,
                    ext3,
                    ext4,
                    ext5,
                    ext6,
                    id,
                    note,
                    operOrg,
                    operTime,
                    operator,
                    president,
                    qryReason,
                    queryFormat,
                    queryTime,
                    queryType,
                    reason,
                    refuseReasons,
                    rekOrg,
                    rekTime,
                    rekType,
                    rekUser,
                    remarks,
                    reqId,
                    resCode,
                    resMsg,
                    resultStatus,
                    resultType,
                    serialNumber,
                    source,
                    status, cookie):
        '''异步查询时，本地报告查询'''
        data = {
            'archiveId': archiveId,
            'archiveViewStatus': archiveViewStatus,
            'assocbsnssData': assocbsnssData,
            'certNo': certNo,
            'certType': certType,
            'checkinfoId': checkinfoId,
            'clientIp': clientIp,
            'clientName': clientName,
            'creditUser': creditUser,
            'ext1': ext1,
            'ext2': ext2,
            'ext3': ext3,
            'ext4': ext4,
            'ext5': ext5,
            'ext6': ext6,
            'id': id,
            'note': note,
            'operOrg': operOrg,
            'operTime': operTime,
            'operator': operator,
            'president': president,
            'qryReason': qryReason,
            'queryFormat': queryFormat,
            'queryTime': queryTime,
            'queryType': queryType,
            'reason': reason,
            'refuseReasons': refuseReasons,
            'rekOrg': rekOrg,
            'rekTime': rekTime,
            'rekType': rekType,
            'rekUser': rekUser,
            'remarks': remarks,
            'reqId': reqId,
            'resCode': resCode,
            'resMsg': resMsg,
            'resultStatus': resultStatus,
            'resultType': resultType,
            'serialNumber': serialNumber,
            'source': source,
            'status': status
        }
        req = Request(ServerUrl.per_show_localcreditreport_url, data=data, headers=cookie)
        return req.post()








if __name__ == "__main__":
    pass